import java.util.Scanner;

public class Question04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个三位数");
        int a = scanner.nextInt();
        int a0 = a;
        if (a0 >= 100 && a0 <= 1000) {
            int a100 = a / 100;//求出百位的数
            a = a % 100;//除去百位剩下十位个位

            int a10 = a / 10;//求出十位的数
            a = a % 10;//除去十位剩下个位

            if (a0 == a100 * a100 * a100 + a10 * a10 * a10 + a * a * a) {
                System.out.println(a0 + "是水仙花数");
            } else {
                System.out.println(a0 + "不是水仙花数");
            }
        }
    }
}
